<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title></title>
    <link rel="shortcut icon" href="favicon.ico"> <link href="/static/console/css/bootstrap.min14ed.css?v=3.3.6" rel="stylesheet">
    <link href="/static/console/css/font-awesome.min93e3.css?v=4.4.0" rel="stylesheet">
    <link href="/static/console/css/animate.min.css" rel="stylesheet">
    <link href="/static/console/css/style.min862f.css?v=4.1.0" rel="stylesheet">
    <link href="/static/console/css/plugins/sweetalert/sweetalert.css" rel="stylesheet">


</head>

<body class="gray-bg">
    <div class="wrapper wrapper-content animated fadeInRight">
        <div class="row">
            <div class="col-sm-12">
                 <div class="alert alert-warning alert-dismissable m-t">
                    <code>提示：密码留空则不修改密码</code>
                </div>
                <div class="ibox float-e-margins">
                    <div class="ibox-title">
                        <h5>编辑管理员</h5>
                        <div class="ibox-tools">
                            <a href="javascript:(0)" onClick="javascript:history.back(-1);" class="btn btn-primary btn-xs">返回 <i class="glyphicon glyphicon-share-alt"></i></a>
                        </div>
                    </div>
                    <div class="ibox-content">
                        <form action="/console/manager/editPost" method="post" class="form-horizontal m-t" id="form1">
                            <input type="hidden" name="id" value="{$detail.id}" />
                            <div class="form-group">
                                <label class="col-sm-2 control-label">选择角色：</label>
                                <div class="col-sm-4">
                                    <select class="form-control m-b" name="role_id">
                                        <option value="">--请选择角色--</option>
                                        {foreach $roles as $key => $role} 
                                        <option value="{$role.id}" {if condition="$role.id == $detail.role_id"}selected{/if}>{$role.name}</option>
                                        {/foreach}
                                    </select>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label">管理员账号：</label>
                                <div class="col-sm-4">
                                    <input id="cname" name="name" minlength="2" type="text" class="form-control" required="" value="{$detail.name}" aria-required="true">
                                </div>
                                *
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label">管理员密码：</label>
                                <div class="col-sm-4">
                                    <input id="cemail" type="text" class="form-control" name="password"  value="{$Think.session.old.password}" aria-required="true">
                                </div>
                            </div>
                            {if condition="($Think.session.adminInfo.role_id == 0) or in_array('console/manager/editPost',$Think.session.accessesArray)"}
                            <div class="form-group">
                                <div class="col-sm-4 col-sm-offset3">
                                    <button class="btn btn-primary" onclick="subpost();" type="button">更新</button>
                                </div>
                            </div>
                            {/if}
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <script src="/static/console/js/jquery.min.js?v=2.1.4"></script>
    <script src="/static/console/js/plugins/validate/jquery.validate.min.js"></script>
    <script src="/static/console/js/plugins/validate/messages_zh.min.js"></script>
    <script src="/static/console/js/demo/form-validate-demo.min.js"></script>
    <script src="/static/console/js/plugins/sweetalert/sweetalert.min.js"></script>
    <script src="/static/console/js/subpost.js"></script>
</body>


<!-- Mirrored from www.zi-han.net/theme/hplus/form_validate.html by HTTrack Website Copier/3.x [XR&CO'2014], Wed, 20 Jan 2016 14:19:16 GMT -->
</html>
